#include <mysql++.h>
#include <libxml/parser.h>
#include <libxml/xmlexports.h>
#include "CThread.h"
#include "Mutex.h"
#include <deque>
#include <iostream>
#include <string>

#define XMLPATH "config/dbserver.xml"

using namespace mysqlpp;

class CDBServer:public CThread
{
	public:
		CDBServer();
		~CDBServer();
		bool init();
		bool AddExeucteStr(std::string strSql);

	protected:
		void Run();

	private:
		char dbhost[64];
		char dbpwd[64];
		char dbname[64];
		char dbasename[64];
	protected:
		std::deque<std::string> m_dSqlstrs;
		Mutex m_lock;
	public:
		static	mysqlpp::Connection* m_con;

};
